#/bin/sh
UPLOAD_VERSION=1.0.0
UPLOAD_DESC='Init Care release'
WX_CLI=/Applications/wechatwebdevtools.app/Contents/MacOS/cli
echo "版本号是${UPLOAD_VERSION}"
echo "描述是${UPLOAD_DESC}"

PRO_ROOT=$(pwd)/build/ZZWAMain
echo "PRO_ROOT是${PRO_ROOT}"
PORT=$(cat ~/Library/Application\ Support/微信web开发者工具/50a7d9210159a32f006158795f893857/Default/.ide)

$WX_CLI -l --login-qr-output base64@qrcode.txt
echo '上传到微信后台'

$WX_CLI -u ${UPLOAD_VERSION}@/Users/用户名/.jenkins/workspace/项目名/项目名 --upload-desc ${UPLOAD_DESC}


#clean up
rm /Users/用户名/.jenkins/workspace/项目名/qrcode.jpg
rm /Users/用户名/qrcode.txt
cp /Users/用户名/expired.png /Users/用户名/.jenkins/workspace/项目名/qrcode.jpg
